Code Completion with Neural Attention and Pointer Networks
نویسندگان
چکیده
Intelligent code completion has become an essential tool to accelerate modern software development. To facilitate effective code completion for dynamically-typed programming languages, we apply neural language models by learning from large codebases, and investigate the effectiveness of attention mechanism on the code completion task. However, standard neural language models even with attention mechanism cannot correctly predict out-of-vocabulary (OoV) words thus restrict the code completion performance. In this paper, inspired by the prevalence of locally repeated terms in program source code, and the recently proposed pointer networks which can reproduce words from local context, we propose a pointer mixture network for better predicting OoV words in code completion. Based on the context, the pointer mixture network learns to either generate a within-vocabulary word through an RNN component, or copy an OoV word from local context through a pointer component. Experiments on two benchmarked datasets demonstrate the effectiveness of our attention mechanism and pointer mixture network on the code completion task.
منابع مشابه
Neuron Mathematical Model Representation of Neural Tensor Network for RDF Knowledge Base Completion
In this paper, a state-of-the-art neuron mathematical model of neural tensor network (NTN) is proposed to RDF knowledge base completion problem. One of the difficulties with the parameter of the network is that representation of its neuron mathematical model is not possible. For this reason, a new representation of this network is suggested that solves this difficulty. In the representation, th...
متن کاملPaying Attention to SQuAD: Exploring Bidirectional Attention Flow
With the goal of automated reading comprehension, we apply a neural network with Bidirectional Attention Flow (BiDAF) to the Stanford Question Answering Dataset (SQuAD) and achieve F1 and Exact Match (EM) scores close to the original paper with a single model. We obtain a test F1 score of 76.037 and test EM score of 66.663. Our model includes Character-level CNN embeddings, a Highway Network la...
متن کاملPointer Networks
We introduce a new neural architecture to learn the conditional probability of an output sequence with elements that are discrete tokens corresponding to positions in an input sequence. Such problems cannot be trivially addressed by existent approaches such as sequence-to-sequence [1] and Neural Turing Machines [2], because the number of target classes in each step of the output depends on the ...
متن کاملNeural Code Completion
Code completion, an essential part of modern software development, yet can be challenging for dynamically typed programming languages. In this paper we explore the use of neural network techniques to automatically learn code completion from a large corpus of dynamically typed JavaScript code. We show different neural networks that leverage not only token level information but also structural in...
متن کاملProject Time and Cost Forecasting using Monte Carlo simulation and Artificial Neural Networks
The aim of this study is to present a new method to predict project time and cost under uncertainty. Assuming that what happens in projects implementation which is expressed in the form of Earned Value Management (EVM) indicators is primarily related to the nature of randomness or unreliability, in this study, by using Monte Carlo simulation, and assuming a specific distribution for the time an...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
- CoRR
دوره abs/1711.09573 شماره
صفحات -
تاریخ انتشار 2017